module.exports = function($scope, $state, $stateParams, $modalInstance,$resource,$modal,FileUploader,toaster){
  // $scope.bigCurrentPage = 1;      //当前页码
  // $scope.itemsPerPage = 10000;         //每页显示几条

  var para = {}

  $scope.info = [];
  $scope.savedata = {};
  $scope.obj = {
    'id': ''
  };
  $resource('/api/as/tc/placeview/jjlist', {}, {}).save(para,function (res) {

    if (res.errcode !== 0) {
      alert("数据获取失败");
      return;
    }
    $scope.info = res.data;
    console.log("获取景区列表"+res.data);
  });

  $scope.cancel = function () {
    $modalInstance.dismiss('cancel');
  };
  $scope.ok = function () {
    console.log($scope.obj.id);
    $resource('/api/as/tc/place/info', {}, {}).save({'id':$scope.obj.id},function (res) {

      if (res.errcode !== 0) {
        alert("数据获取失败");
        return;
      }
      $scope.savedata = res.data;
      // 插入我的表里
      $resource('/api/as/ggc/railmapdao/createScenicAreaList', {}, {}).save($scope.savedata,function (res) {
        if (res.errcode !== 0) {
          alert("插入失败");
          return;
        }
        $modalInstance.close();
      });
      console.log("获取景区详细信息："+res.data);
    });
  };





  // /api/as/tc/placeview/jjlist 列表

  // /api/as/tc/place/info  入参 id 详情
}